package cn.lyvust.demo.shili10;

public class YieldTest {
    public static void main(String[] args) {
        System.out.println("*****线程的礼让*****");
        YieldRunnable my = new YieldRunnable();
        Thread t1 = new Thread(my,"线程A");
        Thread t2 = new Thread(my,"线程B");
        t1.start();
        t2.start();
    }
}
